package com.yehun.annotation;


import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

import java.lang.annotation.*;

@Documented
@Order(Ordered.HIGHEST_PRECEDENCE)
@Target({ ElementType.METHOD, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
public @interface SyncLock {

    /**
     * 同步锁key
     */
    String key();

    /**
     * 超时时间
     */
    long timeout() default 2000L;

}
